﻿using Microsoft.AspNetCore.Razor.TagHelpers;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xfm.TagHelpers.Exts;
using Xfm.TagHelpers.Enums;
using System.Globalization;

namespace Xfm.TagHelpers
{
    [HtmlTargetElement(Attributes = "bg")]
    public class BgTagHelper: TagHelper
    {
        public ThemeColor Bg { get; set; }
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            output.AddClass($"bg-{Bg.ToString().ToLower(CultureInfo.CurrentCulture)}");
        }
    }
}
